Improve flaky dashboard integration test#12534
Merged
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12534Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12534" |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the LogOutput_LocalhostAddress_LocalhostInLogOutput test to improve reliability and add MCP endpoint logging verification. The test previously had issues with port allocation retries due to shared state between test sink instances.
- Modified test to reuse a single
TestSinkinstance across retries instead of recreating it, preventing log pollution from previous failed attempts - Added MCP endpoint configuration and verification to the test
- Improved port collision detection in
ServerRetryHelperwith better random spacing and duplicate detection
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/Aspire.Dashboard.Tests/Integration/StartupTests.cs | Enhanced test to verify MCP endpoint logging, fixed TestSink reuse issue, and added OTLP HTTP port configuration |
| tests/Aspire.Dashboard.Tests/Integration/ServerRetryHelper.cs | Added duplicate port detection and improved random port spacing |
| src/Aspire.Dashboard/DashboardWebApplication.cs | Added MCP endpoint logging to startup output |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
c746109 to
7375feb
Compare
davidfowl
approved these changes
Oct 31, 2025
Member
Author
|
/backport to release/13.0 |
Contributor
|
Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/18962795178 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I think some dashboard tests have been flaky because the next random port logic doesn't provide a min random number. A random increase of 0 could be used which would generate unexpected test results.
Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplate